<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:t="http://myfaces.apache.org/tomahawk">
<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<link rel="stylesheet" type="text/css" href="format.css" />
	<title></title>
</h:head>
<h:body>
	<ui:composition template="template.xhtml">
		<ui:define name="ui_right">

			<h:form enctype="multipart/form-data">
				<p:messages for="atta" />
				<p:growl></p:growl>

			<h:inputHidden value="#{advertisementRegBean.addedAdvert}"/>
					<p:panelGrid columns="1"
						rendered="#{advertisementRegBean.avalible}">
						<f:facet name="header">
							<h:outputText value="Dodaj załącznik" />
						</f:facet>

						<t:inputFileUpload id="fileupload"
							value="#{advertisementRegBean.upFile}" size="20" storage="file" />
						<p />
						<p:commandButton value="Load" update="#{advertisementRegBean.attachment1}"
							action="#{advertisementRegBean.handleFileUpload}" ajax="false" />

					</p:panelGrid>
			</h:form>
			<h:form>

				<h3>
					<h:outputText value="#{advertisementRegBean.advertisement.title}" />
				</h3>
				<span class="daty">Ważne od: <b><h:outputText
							value="#{advertisementRegBean.advertisement.startDate}" /></b></span>
				<br />
				<span class="daty">Ważne do: <b><h:outputText
							value="#{advertisementRegBean.advertisement.expireDate}" /></b></span>
				<br />


				<h:outputText value="#{advertisementRegBean.advertisement.content}" />
				<br />
				<br />



				<h:commandLink value="Strona główna" action="index2" />
				<h:outputText />
			</h:form>
		</ui:define>
	</ui:composition>
</h:body>
</html>
